/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.dwh.trigger;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author Jose Carlos Palma
 * @version v1.0
 */
public class Trigger {
    
    /**
     * Indica el formato de fecha para los triggers.
     */
    private static final SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd HH:mm:ss");
    
    /**
     * Almacena la fecha del trigger.
     */
    private Date date;
    /**
     * Almace la trama del trigger.
     */
    private StringBuilder plot;
    /**
     * Almacena la SDP origen.
     */
    private String sdp;
    
    /**
     * 
     * @param date
     * @param sdp
     * @param plot
     */
    public Trigger(Date date, String sdp, StringBuilder plot){
        this.date = date;
        this.plot = plot;
        this.sdp = sdp;
    }

    /**
     * 
     * @param sdp
     * @param plot
     */
    public Trigger(String sdp, StringBuilder plot){
        this( new Date(), sdp, plot );
    }
    
    

    /**
     * @return the date
     */
    public Date getDate() {
        return date;
    }

    /**
     * @return the plot
     */
    public StringBuilder getPlot() {
        return plot;
    }

    public String getSDP(){
        return sdp;
    }

    /**
     * 
     * @return
     */
    @Override
    public String toString() {
        return sdf.format(date) + " " + plot.toString();
    }
    
    

    
}
